<?php
class Upload extends CFormModel
{
    public $image;
    public $content;
 
    public function rules()
    {
        return array(
        	array('image', 'file', 'allowEmpty'=>true,
        				'types'=>'jpg, jpeg, gif, png',
        				'maxSize'=>1024 * 1024 * 8, // 1MB
        				'tooLarge'=>'上传文件超过 1MB，无法上传。',
        	),        			
        );
        
    }
}
